package cn.jsu.oj.judgment.strategy;

import cn.jsu.oj.judgment.pojo.AbstractPack;
import cn.jsu.oj.judgment.pojo.ApplyTaskNumber;
import cn.jsu.oj.judgment.thread.ApplyTaskThread;
import lombok.extern.slf4j.Slf4j;

/**
 * 应答响应 处理策略类
 *
 * typeNo 21号
 */
@Slf4j
public class QuantityResponseHandle implements ApplyRolePackHandle{


    @Override
    public void handle(AbstractPack abstractPack, int ct) throws Exception {
        ApplyTaskNumber quantityResponse = (ApplyTaskNumber) abstractPack;
        int taskQuantity = quantityResponse.getApplyNumber();
        ApplyTaskThread.taskCount += taskQuantity;
        log.info("任务数量应答大小{}>>>>>", taskQuantity);
    }
}
